package com.youlai.boot.modules.content.model.form;

import java.io.Serial;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 文章表单对象
 *
 * @author lz0816
 * @since 2025-02-25 16:26
 */
@Getter
@Setter
@Schema(description = "文章表单对象")
public class LzArticleForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "标题")
    @Size(max = 256, message = "标题长度不能超过256个字符")
    private String title;

    @Schema(description = "文章内容")
    private String content;

    @Schema(description = "文章摘要")
    @Size(max = 1024, message = "文章摘要长度不能超过1024个字符")
    private String summary;

    @Schema(description = "所属分类id")
    private Long categoryId;

    @Schema(description = "标签")
    private List<Long> tagIds;

    @Schema(description = "缩略图")
    @Size(max = 256, message = "缩略图长度不能超过256个字符")
    private String thumbnail;

    @Schema(description = "是否置顶（0否，1是）")
    @Size(max = 1, message = "是否置顶（0否，1是）长度不能超过1个字符")
    private String isTop;

    @Schema(description = "状态（0已发布，1草稿）")
    @Size(max = 1, message = "状态（0已发布，1草稿）长度不能超过1个字符")
    private String status;

    @Schema(description = "访问量")
    private Long viewCount;

    @Schema(description = "是否允许评论 1是，0否")
    @Size(max = 1, message = "是否允许评论 1是，0否长度不能超过1个字符")
    private String isComment;

    private Long createBy;

    private LocalDateTime createTime;

    private Long updateBy;

    private LocalDateTime updateTime;

    @Schema(description = "删除标志（0代表未删除，1代表已删除）")
    private Integer isDeleted;


}
